package com.toycloud.business.controller.business;

import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;

import com.toycloud.business.dto.params.business.FeedbackProductParamManagerDetailParams;
import com.toycloud.business.dto.results.CommonResult;
import com.toycloud.common.core.controller.BaseController;
import com.toycloud.common.core.utils.poi.ExcelUtil;
import com.toycloud.system.domain.business.FeedbackProductParamManagerDetail;
import com.toycloud.system.log.annotation.Log;
import com.toycloud.system.log.enums.BusinessType;
import com.toycloud.system.mapper.business.FeedbackProductParamManagerDetailMapper;
import com.toycloud.system.service.business.IFeedbackProductParamManagerDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * 产品参数管理关联Controller
 * 
 * @author ruoyi
 * @date 2024-12-18
 */
@RestController
@RequestMapping("/paramdetail")
public class FeedbackProductParamManagerDetailController extends BaseController
{
    @Autowired
    private IFeedbackProductParamManagerDetailService feedbackProductParamManagerDetailService;
    @Resource
    private FeedbackProductParamManagerDetailMapper feedbackProductParamManagerDetailMapper;

    /**
     * 查询产品参数管理关联列表
     */
    @GetMapping("/list")
    public CommonResult<List<FeedbackProductParamManagerDetail>> list(FeedbackProductParamManagerDetailParams feedbackProductParamManagerDetailParams)
    {
        return feedbackProductParamManagerDetailService.selectFeedbackProductParamManagerDetailList(feedbackProductParamManagerDetailParams);
    }

    /**
     * 导出产品参数管理关联列表
     */
    @Log(title = "产品参数管理关联", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, FeedbackProductParamManagerDetailParams feedbackProductParamManagerDetailParams)
    {
        List<FeedbackProductParamManagerDetail> list = feedbackProductParamManagerDetailMapper.selectFeedbackProductParamManagerDetailList(feedbackProductParamManagerDetailParams);
        ExcelUtil<FeedbackProductParamManagerDetail> util = new ExcelUtil<FeedbackProductParamManagerDetail>(FeedbackProductParamManagerDetail.class);
        util.exportExcel(response, list, "产品参数管理关联数据");
    }

}
